package com.wlyuan.open.domain.source.assembler;

import com.wlyuan.basic.dto.driver.DriverRewriteDTO;
import com.wlyuan.core.domain.MappingIds;
import com.wlyuan.core.marker.NamedStatus;
import com.wlyuan.open.dto.OpenDriverSyncDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author lijing
 */
public class DriverAssembler {

    private static final Assembler ASSEMBLER = Mappers.getMapper(Assembler.class);

    @Mapper(uses = {
            MappingIds.class,
    }, imports = {
            NamedStatus.class,
    })
    public interface Assembler {

        DriverRewriteDTO assemble(OpenDriverSyncDTO source);
    }

    public static DriverRewriteDTO assemble(OpenDriverSyncDTO source) {
        return ASSEMBLER.assemble(source);
    }
}
